package org.jetlinks.demo.protocol.siterwell.tcp.message;

import lombok.Getter;
import lombok.Setter;
import org.jetlinks.demo.protocol.siterwell.tcp.constant.DirectiveType;

/**
 * 设备状态,一般是子设备故障状态
 * 设备网关发往平台的数据
 */
@Getter
@Setter
public class D2SDeviceFaultStatus extends D2SDeviceStatus {


    public static D2SDeviceFaultStatus of(byte[] data) {
        D2SDeviceFaultStatus message = new D2SDeviceFaultStatus();
        message.fromBytes(data, 0);
        return message;
    }


    protected String getDeviceStatusCode() {
        return DirectiveType.FAULT.getCode();
    }


}
